<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <?php include_http_metas() ?>
    <?php include_metas() ?>
    <?php include_title() ?>
    <link rel="shortcut icon" href="/favicon.ico" />
    <?php include_stylesheets() ?>
    <?php include_javascripts() ?>

    <script type="text/javascript">
      $(document).ready(function(){
        $('.autocomplete_box').autocomplete({
          serviceUrl:'<?php echo url_for('page/autocomplete') ?>',
          minChars:2,
          delimiter: /(,|;)\s*/, // regex or character
          maxHeight:400,
          width:300,
          zIndex: 9999,
          deferRequestBy: 0, //miliseconds
          noCache: false //default is false, set to true to disable caching
        });
      })
    </script>
  </head>
  <body>
    <div id="menu_wrapper">
      <div id="menu_holder">
        <div id="menu">
          <div id="logo">
            <a href="<?php echo url_for('@homepage') ?>" style="text-decoration: underline; font-weight: bold; font-style: italic">
              Addictive Quotes
            </a>
          </div>
          <div id="top_search_bar">
            <?php include_partial('page/search_top', array('form' => new SearchForm())) ?>
          </div>
          <?php include_partial('page/menu') ?>
        </div>
      </div>
    </div>

    <div id="body_wrapper">
      <div id="body_holder">
        <table style="width: 100%">
          <tr>
            <td colspan="2">
              <?php if ($sf_user->hasFlash('notice')): ?>
                <div class="flash_notice"><?php echo $sf_user->getFlash('notice') ?></div>
              <?php endif ?>
            </td>
          </tr>
          <tr>
            <td>
              <div id="body">
                <?php echo $sf_content ?>
              </div>
            </td>
            <td style="width: 320px">
              <div id="sidebar">
                <?php include_component('quote', 'randomQuotes') ?>
              </div>
            </td>
          </tr>
        </table>
      </div>
    </div>

    <div id="footer_wrapper">
      <div id="footer_holder">
        <div id="footer">
          © 2012 AddictiveQuotes.com. All rights reserved.
        </div>
      </div>
    </div>
    <?php include_component('page', 'webStatistics') ?>
  </body>
</html>
